package com.tencent.wuyanzu.service.impl;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tencent.wuyanzu.dao.UserDao;
import com.tencent.wuyanzu.model.Food;
import com.tencent.wuyanzu.model.User;
import com.tencent.wuyanzu.service.TestService;
import com.tencent.wuyanzu.util.ResultMessage;

@Service
public class TestServiceImpl implements TestService{

	@Autowired
	private UserDao userDao;

	@Override
	public ResultMessage submitTest(int uid, int choice) {
		
		User user = userDao.getUser(uid);
		user.setPrefer(choice);
		userDao.updateUser(user);
		return ResultMessage.SUCCESS;
		
	}
	
	

}
